package com.chagee.store.operation.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Objects;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("store_task_relation")
public class StoreTaskRelationDO extends BaseDOStoreTask implements Serializable {

	@TableId(type = IdType.AUTO)
	private Long id;

	// 门店编号
	private String storeNo;

	/**
	 * 打烊基础任务id
	 */
	private String taskId;

	// 任务名称
	private String taskName;


	//示意图
	private String picture;

	//文字描述
	private String wordDescribe;

	//是否修改,0未修改 ;1已修改
	private Integer modify;


	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		if (!super.equals(o)) return false;
		StoreTaskRelationDO that = (StoreTaskRelationDO) o;
		return storeNo.equals(that.storeNo) && taskId.equals(that.taskId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(super.hashCode(), storeNo, taskId);
	}
}
